public class ZhaiZhiJie
{
    public static void main(String[] args)
    {
        Person p1 = new Person("zhangsan", 10);
        Person p2 = new Person("lisi", 18);
        Person p3 = new Person("wangwu", 30);
        System.out.print("修改前：");
        p1.info();
        p2.info();
        p3.info();
        Person.setCountry("B城");
        System.out.print("修改后：");
        p1.info();
        p2.info();
        p3.info();
    }
}

class Person
{
    private String name;
    private int age;
    static String country = "A城";
    public Person(String name, int age)
    {
        this.setName(name);
        this.setAge(age);
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public void setAge(int age)
    {
        this.age = age;
    }
    public static void setCountry(String country1)
    {
        country = country1;
    }
    public void info()
    {
        System.out.println("姓名：" + this.name + "、年龄：" +age + "、城市：" + country);
    }
}
